package com.laolang.pluto.module.sys.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import com.laolang.pluto.module.sys.entity.SysMenu;
import com.laolang.pluto.module.sys.pojo.vo.SysMenuTreeVo;

/**
 * @author laolang
 * @date 2021-08-10 23:28
 */
@Mapper(componentModel = "spring")
public interface SysMenuMapStruct {

    @Mappings({
            @Mapping(source = "id", target = "id"),
            @Mapping(source = "path", target = "href"),
            @Mapping(target = "icon", ignore = true)
    })
    SysMenuTreeVo entity2treevo(SysMenu entity);
}
